#!/usr/bin/env python
# -*- coding: utf-8 -*-

"""
@Project: kubeext-SDS 
@File: testconstant.py
@Author: admin
@Date: 2022/6/9 10:20 
@desc: 
"""

# 存储相关常量
LOCAL_FS = 'localfs'
NFS = 'nfs'
CEPH_DEV = 'ceph_dev'
SANDSTONE = 'sandstone'

# kubesds测试包含存储类型
KUBESDS_TEST_STORAGE_TYPE = (LOCAL_FS, NFS, CEPH_DEV, SANDSTONE)
# kubesds测试文件系统存储
KUBESDS_TEST_FILE_STORAGE_TYPE = (LOCAL_FS, NFS)
# kubesds测试块存储
KUBESDS_TEST_BLOCK_STORAGE_TYPE = (CEPH_DEV, SANDSTONE)

# 存储
VMD = 'vmd'
# 镜像服务器/备份服务器
VMDi = 'vmdi'

# localFs存储url和opt参数
LOCAL_FS_URL = '/mnt/localfs/kubesdstest'
LOCAL_FS_OPT = None
# Nfs存储url和opt参数
NFS_URL = '192.168.20.127:/home/nfs5'
NFS_OPT = 'nolock'
# cephBlock存储url和opt参数
CEPH_DEV_URL = None
CEPH_DEV_OPT = 'mirror-cache-pool=mirror-cache-pool,' \
               'data-cloud-disk-pool=data-cloud-disk-pool,' \
               'root-cloud-disk-pool=root-cloud-disk-pool,' \
               'mon-nodes=[' \
               '{username=root;pwd=user@dev;host=192.168.26.166;port=22;ceph_port=6789},' \
               '{username=root;pwd=user@dev;host=192.168.26.167;port=22;ceph_port=6789},' \
               '{username=root;pwd=user@dev;host=192.168.26.168;port=22;ceph_port=6789}]'

# sandstone存储url和opt参数
SANDSTONE_URL = None
SANDSTONE_OPT = 'mirror-cache-pool=mirror_cache_pool,' \
                'data-cloud-disk-pool=data_cloud_disk_pool,' \
                'root-cloud-disk-pool=root_cloud_disk_pool,' \
                'mon-nodes=[' \
                '{host=192.168.26.124;ceph_port=6789},' \
                '{host=192.168.26.125;ceph_port=6789},' \
                '{host=192.168.26.126;ceph_port=6789}]'

# 云盘/快照相关常量
# 云盘类型
# 默认为数据盘
DEFAULT_VOL_TYPE = 'data'
# 初始创建云盘容量（2G）
DEFAULT_VOL_CAPACITY = 2147483648
# 初始创建云盘预分配策略
DEFAULT_PRE_ALLOCATION = 'off'
# 云盘扩容后容量（4G）
RESIZE_VOL_CAPACITY = 2 * DEFAULT_VOL_CAPACITY
